package com.zhoug.mpchart.core;

import java.util.UUID;

import androidx.annotation.NonNull;

/**
 * @Author: zhoug
 * @Date: 2024-02-03
 * @Description:
 */
public class MPBarKey {
    private String uuid;
    private String[] keys;
    /**
     * 数据使用的坐标轴 默认左轴
     * {@link MPConstant.AxisDependency}
     */
    private @MPConstant.AxisDependency
    int axisDependency;


    public MPBarKey(String[] keys) {
        this(keys, MPConstant.LEFT);
    }

    public MPBarKey(String key) {
        this(new String[]{key}, MPConstant.LEFT);
    }

    public MPBarKey(@NonNull String key, @MPConstant.AxisDependency int axisDependency) {
        this(new String[]{key}, axisDependency);
    }

    public MPBarKey(@NonNull String[] keys, @MPConstant.AxisDependency int axisDependency) {
        this.keys = keys;
        this.axisDependency = axisDependency;
        this.uuid = UUID.randomUUID().toString();
    }


    public String[] getKeys() {
        return keys;
    }

    public @MPConstant.AxisDependency
    int getAxisDependency() {
        return axisDependency;
    }

    public String getUUID() {
        return uuid;
    }
}
